package com.mars.admin.modules.activity.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 活动报名实体
 *
 * @author Mars
 * @version 1.0
 * @date 2025-01-07
 */
@Data
@Table("tb_activity_registration")
@Schema(description = "活动报名")
public class ActivityRegistration {

    /**
     * 报名ID
     */
    @Id(keyType = KeyType.Auto)
    @Schema(description = "报名ID", example = "1")
    private Long id;

    /**
     * 活动ID
     */
    @Schema(description = "活动ID", example = "1")
    private Long activityId;

    /**
     * 用户ID
     */
    @Schema(description = "用户ID", example = "1")
    private Long userId;

    /**
     * 真实姓名
     */
    @Schema(description = "真实姓名", example = "张三")
    private String realName;

    /**
     * 联系电话
     */
    @Schema(description = "联系电话", example = "13800138000")
    private String phone;

    /**
     * 身份证号
     */
    @Schema(description = "身份证号", example = "110101199001011234")
    private String idCard;

    /**
     * 紧急联系人
     */
    @Schema(description = "紧急联系人", example = "李四")
    private String emergencyContact;

    /**
     * 紧急联系电话
     */
    @Schema(description = "紧急联系电话", example = "13900139000")
    private String emergencyPhone;

    /**
     * 参与人数
     */
    @Schema(description = "参与人数", example = "2")
    private Integer participantsCount;

    /**
     * 参与者信息
     */
    @Schema(description = "参与者信息", example = "[{\"name\":\"张三\",\"phone\":\"13800138000\"}]")
    private String participantsInfo;

    /**
     * 特殊要求
     */
    @Schema(description = "特殊要求", example = "素食")
    private String specialRequirements;

    /**
     * 支付金额
     */
    @Schema(description = "支付金额", example = "99.00")
    private BigDecimal paymentAmount;

    /**
     * 支付状态：0-未支付，1-已支付，2-已退款
     */
    @Schema(description = "支付状态", example = "1")
    private Integer paymentStatus;

    /**
     * 支付时间
     */
    @Schema(description = "支付时间")
    private LocalDateTime paymentTime;

    /**
     * 支付方式
     */
    @Schema(description = "支付方式", example = "wechat")
    private String paymentMethod;

    /**
     * 订单号
     */
    @Schema(description = "订单号", example = "ORDER123456789")
    private String orderNo;

    /**
     * 报名状态：0-待审核，1-已通过，2-已拒绝，3-已取消
     */
    @Schema(description = "报名状态", example = "1")
    private Integer status;

    /**
     * 审核原因
     */
    @Schema(description = "审核原因", example = "符合参与条件")
    private String auditReason;

    /**
     * 审核时间
     */
    @Schema(description = "审核时间")
    private LocalDateTime auditTime;

    /**
     * 签到状态：0-未签到，1-已签到
     */
    @Schema(description = "签到状态", example = "1")
    private Integer checkInStatus;

    /**
     * 签到时间
     */
    @Schema(description = "签到时间")
    private LocalDateTime checkInTime;

    /**
     * 评分：1-5分
     */
    @Schema(description = "评分", example = "5")
    private Integer rating;

    /**
     * 评价内容
     */
    @Schema(description = "评价内容", example = "活动很棒，组织得很好")
    private String review;

    /**
     * 评价时间
     */
    @Schema(description = "评价时间")
    private LocalDateTime reviewTime;

    /**
     * 创建时间
     */
    @Schema(description = "报名时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private LocalDateTime updateTime;
} 